<template>
    <div>
        <div class="recommend-title">
            <img class="mp-title-img" src="http://img1.qunarzz.com/piao/fusion/1711/16/bfbb9874e8f11402.png" alt="本周热门榜单">
            <span class="mp-title">本周热门榜单</span>
        </div>
        <ul v-for="item of recommendList" :key="item.id">
            <li>
                <a class="item" :href="item.baseURL">
                    <img class="item-img" :src="item.imgURL">
                    <div class="item-info">
                        <p class="item-title">{{item.title}}</p>
                        <p class="item-desc">{{item.desc}}</p>
                        <div class="mp-like-price">
                            <span class="mpg-price">¥<em class="mpg-price-num">{{item.price}}</em></span>
                            起
                            <span class="mp-like-address">{{item.address}}</span>
                            </div>
                    </div>
                </a>
            </li>
        </ul>
    </div>
</template>

<script>
export default {
  name: 'HomeRecommend',
  props: {
    recommendList: Array
  }
}
</script>

<style scoped>
.recommend-title{
    background: #ccc;
    line-height: 250%;
    text-indent: 10px;
    margin-top: 2px;
    height: 250%;
    overflow: hidden;
}

.mp-title-img{
    height: 20px;
    margin-top: -7px;
    margin-left: -2px;
}

.item{
    display: flex;
    height: 100px;
}

.item-img{
    width: 90px;
    height: 90px;
    padding: 5px;
}

.item-info{
    flex: 1;
    padding: 5px;
}

.item-title{
    line-height: 20px;
    font-size: 18px;
}

.item-desc{
    line-height: 15px;
    color: rgb(136, 131, 132);
    margin-top: 10px;
}

.mp-like-price{
    position: relative;
    margin-top: 18px;
    color: #ff8300;
    font-size: 18px;
}

.mpg-price-num{
    font-size: 25px;
}

.mp-like-address{
    position: absolute;
    right: 2px;
    bottom: 2px;
    font-size: 17px;
    color: #c78640;
}

</style>
